$OpenBSD: patch-Instance_framework_make,v 1.13 2017/04/19 21:13:25 sebastia Exp $
--- Instance/framework.make.orig	Fri Jul  8 15:09:17 2016
+++ Instance/framework.make	Wed Apr 19 09:23:16 2017
@@ -261,7 +261,7 @@ ifeq ($(findstring darwin, $(GNUSTEP_TARGET_OS)), darw
 VERSION_FRAMEWORK_LIBRARY_FILE = lib$(GNUSTEP_INSTANCE).$(VERSION)$(SHARED_LIBEXT)
 SONAME_FRAMEWORK_FILE = lib$(GNUSTEP_INSTANCE).$(INTERFACE_VERSION)$(SHARED_LIBEXT)
 else
-VERSION_FRAMEWORK_LIBRARY_FILE = $(FRAMEWORK_LIBRARY_FILE).$(VERSION)
+VERSION_FRAMEWORK_LIBRARY_FILE = $(FRAMEWORK_LIBRARY_FILE).$(INTERFACE_VERSION)
 SONAME_FRAMEWORK_FILE = $(FRAMEWORK_LIBRARY_FILE).$(INTERFACE_VERSION)
 endif
 
@@ -564,13 +564,13 @@ $(GNUSTEP_BUILD_DIR)/$(GNUSTEP_INSTANCE).framework/$(G
 $(GNUSTEP_BUILD_DIR)/$(GNUSTEP_INSTANCE).framework/$(GNUSTEP_TARGET_LDIR)/$(GNUSTEP_INSTANCE): $(GNUSTEP_BUILD_DIR)/$(GNUSTEP_INSTANCE).framework/$(GNUSTEP_TARGET_LDIR)
 ifeq ($(MAKE_CURRENT_VERSION),yes)
 	$(ECHO_NOTHING)cd $(GNUSTEP_BUILD_DIR)/$(GNUSTEP_INSTANCE).framework/$(GNUSTEP_TARGET_LDIR); \
-	$(RM_LN_S) $(GNUSTEP_INSTANCE) $(FRAMEWORK_LIBRARY_FILE); \
+	$(RM_LN_S) $(GNUSTEP_INSTANCE) $(VERSION_FRAMEWORK_LIBRARY_FILE); \
 	$(LN_S) `$(REL_PATH_SCRIPT) $(GNUSTEP_TARGET_LDIR) \
 	                            Versions/Current/$(GNUSTEP_TARGET_LDIR)/$(GNUSTEP_INSTANCE) short` \
-	        $(GNUSTEP_INSTANCE); \
+		$(GNUSTEP_INSTANCE); \
 	$(LN_S) `$(REL_PATH_SCRIPT) $(GNUSTEP_TARGET_LDIR) \
-	                            Versions/Current/$(GNUSTEP_TARGET_LDIR)/$(FRAMEWORK_LIBRARY_FILE) short` \
-	        $(FRAMEWORK_LIBRARY_FILE)$(END_ECHO)
+			 	    Versions/Current/$(GNUSTEP_TARGET_LDIR)/$(VERSION_FRAMEWORK_LIBRARY_FILE) short` \
+	        $(VERSION_FRAMEWORK_LIBRARY_FILE)$(END_ECHO)
 endif
 endif
 endif
@@ -598,7 +598,7 @@ endif
 	$(LIB_LINK_CMD) || $(RM) $(FRAMEWORK_FILE) ; \
 	(cd $(LIB_LINK_OBJ_DIR); \
 	  $(RM_LN_S) $(GNUSTEP_INSTANCE); \
-	  $(LN_S) $(LIB_LINK_FRAMEWORK_FILE) $(GNUSTEP_INSTANCE)) \
+	  $(LN_S) $(VERSION_FRAMEWORK_LIBRARY_FILE) $(GNUSTEP_INSTANCE)) \
 	$(END_ECHO)
 
 ifeq ($(GNUSTEP_MAKE_PARALLEL_BUILDING), no)
@@ -685,18 +685,14 @@ endif
 	$(RM_LN_S) $(FRAMEWORK_LIBRARY_FILE); \
 	$(RM_LN_S) $(SONAME_FRAMEWORK_FILE); \
 	$(RM_LN_S) $(VERSION_FRAMEWORK_LIBRARY_FILE); \
-	$(LN_S) `$(REL_PATH_SCRIPT) $(GNUSTEP_LIBRARIES)/$(GNUSTEP_TARGET_LDIR) $(FRAMEWORK_INSTALL_DIR)/$(FRAMEWORK_CURRENT_LIBRARY_DIR_NAME)/$(FRAMEWORK_LIBRARY_FILE) short` $(FRAMEWORK_LIBRARY_FILE); \
 	if test -r "$(FRAMEWORK_INSTALL_DIR)/$(FRAMEWORK_LIBRARY_DIR_NAME)/$(SONAME_FRAMEWORK_FILE)"; then \
 	  $(LN_S) `$(REL_PATH_SCRIPT) $(GNUSTEP_LIBRARIES)/$(GNUSTEP_TARGET_LDIR) $(FRAMEWORK_INSTALL_DIR)/$(FRAMEWORK_LIBRARY_DIR_NAME)/$(SONAME_FRAMEWORK_FILE) short` $(SONAME_FRAMEWORK_FILE); \
-	fi; \
-	$(LN_S) `$(REL_PATH_SCRIPT) $(GNUSTEP_LIBRARIES)/$(GNUSTEP_TARGET_LDIR) $(FRAMEWORK_INSTALL_DIR)/$(FRAMEWORK_LIBRARY_DIR_NAME)/$(VERSION_FRAMEWORK_LIBRARY_FILE) short` $(VERSION_FRAMEWORK_LIBRARY_FILE)$(END_ECHO)
+	fi;$(END_ECHO)
 ifneq ($(CHOWN_TO),)
 	$(ECHO_CHOWNING)cd $(GNUSTEP_LIBRARIES)/$(GNUSTEP_TARGET_LDIR); \
-	$(CHOWN) $(CHOWN_TO) $(FRAMEWORK_LIBRARY_FILE); \
 	if test -r "$(SONAME_FRAMEWORK_FILE)"; then \
 	  $(CHOWN) $(CHOWN_TO) $(SONAME_FRAMEWORK_FILE); \
-	fi; \
-	$(CHOWN) $(CHOWN_TO) $(VERSION_FRAMEWORK_LIBRARY_FILE)$(END_ECHO)
+	fi;$(END_ECHO)
 endif
 
 else
